home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_312 / tracksalve / source / explain.a < prev    next >
Text File  |  1992-05-06  |  3KB  |  74 lines

  1. *  explain.a
  2. *
  3. *  Program cmdline help
  4. *
  5.  
  6. *               nolist
  7.                 ifnd    IFILES
  8. IFILES          set     1
  9.                 INCLUDE "exec/types.i"
  10.                 INCLUDE "libraries/dos.i"
  11.                 INCLUDE "libraries/dos_lib.i"
  12.                 INCLUDE "call.i"
  13.                 endc
  14. *               list
  15.  
  16.  
  17. NEWLINE         EQU     $0a
  18.  
  19.                 CSECT   text,0,0,1,2
  20.  
  21.                 XREF    _ConOut,_DOSBase,_Pr
  22.  
  23.                 Func    _Explain
  24.                 lea.l   ExplMsg1(pc),a0                 Load introducer
  25.                 bsr.s   ConMsg                          Print
  26.                 move.l  _Pr(a4),a0                      Load programname from cmdline
  27.                 bsr.s   ConMsg                          Print
  28.                 lea.l   ExplMsg2(pc),a0                 Rest of the explain text
  29.  
  30.                 Func    ConMsg,@ConMsg                  Print (a0) to the console (Not stdout)
  31.                 movem.l d2/d3/a6,-(a7)
  32.                 move.l  a0,d2                           String
  33.                 beq.s   ConMsgRtn                       No string..
  34.                 moveq.l #-1,d3                          Init length parameter
  35. 10$             addq.l  #1,d3                           Counter
  36.                 tst.b   (a0)+                           String terminator?
  37.                 bne.s   10$                             No..
  38.                 move.l  _ConOut(a4),d1                  Console file handle
  39.                 move.l  _DOSBase(a4),a6
  40.                 jsr     _LVOWrite(a6)
  41. ConMsgRtn       movem.l (a7)+,d2/d3/a6
  42.                 rts
  43.  
  44.  
  45. ExplMsg1
  46.   dc.b 'Syntax:   ',0
  47. ExplMsg2
  48.   dc.b ' {<unit(s)> {<Command(s)>}}',NEWLINE
  49.   dc.b 'Function: Modify a Trackdisk device unit addressed by its unit number',NEWLINE
  50.   dc.b '    <no args>       Show present status',NEWLINE
  51.   dc.b 'Units:',NEWLINE
  52.   dc.b ' 0-3   Unit(s)      Succeeding commands are applied to listed units',NEWLINE
  53.   dc.b '  a    All:         Succeeding commands are applied to all TD units',NEWLINE
  54.   dc.b '  !    Warning      Suppress error if the following unit does not exist',NEWLINE
  55.   dc.b 'Commands:',NEWLINE
  56.   dc.b '<none> TD in RAM:   No special functions, just all known bugs removed',NEWLINE
  57.   dc.b '  s    SectorDisk:  Let Trackdisk only give errors from bad sectors',NEWLINE
  58.   dc.b '  t   .TrackDisk:   Normal: Let TD give errors from bad tracks',NEWLINE
  59.   dc.b '  n    NoClick:     Perform noclick on the unit(s)',NEWLINE
  60.   dc.b '  c   .Click:       Normal: No noclick',NEWLINE
  61.   dc.b '  r    ReadOnly:    Make unit read-only, simulate open disk-tab',NEWLINE
  62.   dc.b '  w   .WriteEnable: Normal: Unit is read/write according to disk-tab',NEWLINE
  63.   dc.b '  v    Verify:      Read written track back and compare',NEWLINE
  64.   dc.b '  b   .Believe:     Normal: Asume track is written well',NEWLINE
  65.   dc.b '  o    Original:    Let TD execute in its original ROM code',NEWLINE
  66.   dc.b '  /    Separator:   F.e. "0/2n"  Units 0 and 2 in RAM, noclick only on 2',NEWLINE
  67.   dc.b '  ?    Explain:     If given (anywhere), no commands are executed',NEWLINE
  68.   dc.b 0
  69.  
  70.  
  71.                 END
  72.  
  73.  
  74.